package com.java1412.controller;

import com.java1412.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @author java1412
 * @create 2021-05-13 15:12
 */
@RestController
public class UserController {

    @RequestMapping(value = "/get", method = RequestMethod.GET)
    public Object getList() {
        ArrayList<User> list = new ArrayList<User>();
        // 测试字符串有null的情况
        User u1 = new User("java1412", null);
        list.add(u1);
        return list;
    }
}
